package org.lsb.app_back.controller;

import org.lsb.app_back.domain.AppCategory;
import org.lsb.app_back.service.AppCategoryService;
import org.lsb.app_back.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/appCategory")
public class AppCategoryController {
      @Autowired
      AppCategoryService appCategoryService;

      @GetMapping("/hi")
      public  String hi(){
          return "wfwfwf";
      }


    @GetMapping("/tree")
    public ResultVo getTree(){

      AppCategory tree= appCategoryService.getTree();
      return ResultVo.success("Tree查询成功",tree);
    }

}
